package com.quan.TemplateEditor.dao;

import com.quan.TemplateEditor.dto.AttributeDefDto;
import com.quan.TemplateEditor.entity.AttributeDef;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author southgis
 */
public interface IAttributeDefDao extends JpaRepository<AttributeDef, String>, JpaSpecificationExecutor<AttributeDef> {
    @Query(value = "SELECT * FROM SYS_ATTRIBUTEDEF where tablename = ?1",nativeQuery = true)
    List<AttributeDef> getAttributeByTableName(String tableName);
}
